<!--
 * @Author: Shususumu
 * @Date: 2020-10-17 15:49:06
 * @LastEditTime: 2020-10-20 14:57:39
 * @FilePath: \campusPTjobs\src\views\product\details.vue
-->
<template>
  <div id="product_details">
    <el-button @click="back" type="text" size="medium">返回</el-button>
    <div id="waiter_msg">
      <div class="demo-type">
        <el-avatar :size="100" src="https://empty" @error="errorHandler">
          <img :src="msg.photo" />
        </el-avatar>
      </div>
      <h2>{{ msg.name }}</h2>
      <p>产品价格:{{ msg.price }}</p>
      <p>产品描述:{{ msg.description }}</p>
      <p>类型:{{ msg.categoryName }}</p>
    </div>
  </div>
</template>
<script>
import qs from "querystring";
export default {
  data() {
    return {
      msg: [],
    };
  },
  created() {
    this.msg = this.$route.query.msg;
  },
  methods: {
    back() {
      this.$router.back();
    },
    errorHandler() {
      return true;
    },
  },
};
</script>
<style lang="scss" scoped>
#product_details {
  margin: 18px;
}
#waiter_msg {
  width: 400px;
  margin: 0 auto;
}
</style>